#编译动态库
dy-lib=libmylib.so
$(dy-lib):test1.o test2.o
	gcc -shared -o $@ $^
%.o:%.c
	gcc -fPIC -c $<
	
#发布动态库
.PHONY:output
output:
	mkdir -p mylib/include
	mkdir -p mylib/lib
	cp -f *.h mylib/include
	cp -f *.so mylib/lib
.PHONY:clean
clean:
	rm -rf *.o *.so mylib
